import request from '@/utils/request'

// 查询流程列表
export function listProcess(query) {
  return request({
    url: '/system/process/list',
    method: 'get',
    params: query
  })
}

export function bpmList() {
  return request({
    url: '/system/bpm/list',
    method: 'get'
  })
}
export function getFormData(query) {
  return request({
    url: '/system/bpm/getOpForm',
    method: 'get',
    params:query
  })
}
export function getOpFormExport(query) {
  return request({
    url: '/system/bpm/getOpFormExport',
    method: 'get',
    params:query
  })
}
// 查询应用树
export function getProcessByUserId(query) {
  return request({
    url: '/system/process/getProcessByUser',
    method: 'get',
    params: query
  })
}
export function getProcessByUserId1(query) {
  return request({
    url: '/system/process/getProcessByUser1',
    method: 'get',
    params: query
  })
}
// 查询应用详细
export function getProcess(id) {
  return request({
    url: '/system/process/' + id,
    method: 'get'
  })
}

// 新增应用
export function addProcess(data) {
  return request({
    url: '/system/process/save',
    method: 'post',
    data: data
  })
}

// 修改应用
export function editProcess(data) {
  return request({
    url: '/system/process/update',
    method: 'put',
    data: data
  })
}

// 删除应用
export function delProcess(id) {
  return request({
    url: '/system/process/remove/' + id,
    method: 'delete'
  })
}



// 导出应用
export function exportProcess(query) {
  return request({
    url: '/system/process/export',
    method: 'get',
    params: query
  })
}
